<!DOCTYPE html>
<html>

	<head>

		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">


		<title>修改个人资料</title>
		<meta name="keywords" content="台">
		<meta name="description" content="789">

		<link rel="shortcut icon" href="favicon.ico">
		<link href="css/bootstrap.min.css-v=3.3.5.css"
			tppabs="http://www.zi-han.net/theme/hplus/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
		<link href="css/font-awesome.min.css-v=4.4.0.css"
			tppabs="http://www.zi-han.net/theme/hplus/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
		<link href="css/animate.min.css" tppabs="http://www.zi-han.net/theme/hplus/css/animate.min.css"
			rel="stylesheet">
		<link href="css/plugins/summernote/summernote.css"
			tppabs="http://www.zi-han.net/theme/hplus/css/plugins/summernote/summernote.css" rel="stylesheet">
		<link href="css/plugins/summernote/summernote-bs3.css"
			tppabs="http://www.zi-han.net/theme/hplus/css/plugins/summernote/summernote-bs3.css" rel="stylesheet">
		<link href="css/style.min.css-v=4.0.0.css" tppabs="http://www.zi-han.net/theme/hplus/css/style.min.css?v=4.0.0"
			rel="stylesheet">
		<style>
			.droppable-active {
				background-color: #ffe !important
			}

			.tools a {
				cursor: pointer;
				font-size: 80%
			}

			.form-body .col-md-6,
			.form-body .col-md-12 {
				min-height: 400px
			}

			.draggable {
				cursor: move
			}

			.col-sm-5 {
				width: 100% !important;
				height: 100%;
			}

			.wrapper,
			.wrapper-content {
				height: 600px !important;
			}

			.row {
				height: 100% !important;
			}

			.ibox,
			.float-e-margins {
				height: 100%;
			}

			.ibox-content {
				height: 520px;
			}

			.col-sm-9 {
				width: 40%;
			}


			 #zhuti{
				 height:100%;

			 }
			#zhuti::before{
				background:  url('img/logo1.png')  no-repeat fixed center;
				content:"";
				opacity:0.2;//透明度设置
			z-index:-1;
				width:2000px;
				height:1300px;
				position:absolute;
				/*top:0px;*/
				/*left:0px;*/
				/*border-radius:40px*/
			}
			#xiaohuiid{
				border-top: 0;
				padding-left: 20px;
				height:360px;
				background-color: #fff;
				margin-right: -15px;
				margin-left: -15px;
			}

		</style>
	</head>

	<body class="gray-bg">
		<div class="wrapper wrapper-content">

			<div class="row">
				<div class="col-sm-5">
					<div class="ibox float-e-margins" id="zhuti">
						<div class="ibox-title">
							<h5>修改手机号码</h5>
							<div class="ibox-tools">

							</div>
						</div>
						<div class="ibox-content">
							<div class="form-horizontal m-t">
								<div class="form-group draggable">
									<label class="col-sm-3 control-label">部门办公电话：</label>
									<div class="col-sm-9">
										<input type="text" name="" id="dangqianmima" class="form-control"
											placeholder="" required>

									</div>
								</div>
								<div class="form-group draggable">
									<label class="col-sm-3 control-label">教师电话：</label>
									<div class="col-sm-9">
										<input type="text" id="xinmima" class="form-control" name="password"
											placeholder="" required>
									</div>
								</div>
								<div class="form-group draggable">
									<label class="col-sm-3 control-label">备用电话：</label>
									<div class="col-sm-9">
										<input type="text" id="querenxinmima" class="form-control" name="password"
											placeholder="" required>
									</div>
								</div>
								<div class="form-group draggable">
									<div class="col-sm-12 col-sm-offset-3">
										<button id="mimatijiao" class="btn btn-primary" type="submit">保存</button>
										<button class="btn btn-white" type="reset">重置</button>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>

			</div>
		</div>
		<script src="js/jquery.min.js-v=2.1.4" tppabs="http://www.zi-han.net/theme/hplus/js/jquery.min.js?v=2.1.4">
		</script>
		<script src="layui/layer/layer.js" type="text/javascript" charset="utf-8"></script>
		<script>
			$(document).ready(function() {
				//获取手机号码
				var a1,a2,a3;
				$.ajax({
					type: "POST",
					url: "/user/getInfo",
					success: function (msg) {

						a1=msg['tel1'];
						a2=msg['tel2'];
						a3=msg['tel3'];
						$("#dangqianmima").prop("placeholder",msg['tel1']);
					    $("#xinmima").prop("placeholder",msg['tel2']);
			            $("#querenxinmima").prop("placeholder",msg['tel3']);
					},
					error: function (z) {
						console.log(z);
					}
				});
				//  提交
                   $("#mimatijiao").on("click",function(){
                     	//判断改了吗
						 var dangqianmima = $("#dangqianmima").val();
						 var  xinmima = $("#xinmima").val();
						 var querenxinmima = $("#querenxinmima").val();
						 if(dangqianmima!=""&&xinmima!=""&&querenxinmima!="")
						 {
							 if($.trim(querenxinmima) != $.trim(a3)||$.trim(xinmima)!=$.trim(a2)||$.trim(dangqianmima)!=$.trim(a1)){
								 $.ajax({
									 type: "POST",
									 url: "/user/changeInfo",
									 data: {
										 "tel1":dangqianmima,
										 "tel2":xinmima,
										 "tel3":querenxinmima,
									 },
									 success: function(mg) {
										 if (mg ==("true")){
											 layer.alert("更新成功");
											 $("#dangqianmima").val("");
											 $("#xinmima").val("");
											 $("#querenxinmima").val("");
											 $("#dangqianmima").prop("placeholder",dangqianmima);
											 $("#xinmima").prop("placeholder",xinmima);
											 $("#querenxinmima").prop("placeholder",querenxinmima);
										 }
									 },
									 error: function(mg) {
										 console.log(mg);
									 },
								 });//ajax
							 }//
						 };

					 });


			});
		</script>
		<script src="js/bootstrap.min.js-v=3.3.5"
			tppabs="http://www.zi-han.net/theme/hplus/js/bootstrap.min.js?v=3.3.5"></script>
		<script src="js/content.min.js-v=1.0.0" tppabs="http://www.zi-han.net/theme/hplus/js/content.min.js?v=1.0.0">
		</script>
		<script src="js/jquery-ui-1.10.4.min.js" tppabs="http://www.zi-han.net/theme/hplus/js/jquery-ui-1.10.4.min.js">
		</script>
		<script src="js/plugins/beautifyhtml/beautifyhtml.js"
			tppabs="http://www.zi-han.net/theme/hplus/js/plugins/beautifyhtml/beautifyhtml.js"></script>

		<script type="text/javascript" src="../../../tajs.qq.com/stats-sId=9051096"
			tppabs="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
	</body>

</html>
